import controller from '../controller'

cc.Class({
	extends: controller,

	properties: {

	},

	onLoad () {
		controller.prototype.onLoad.call(this)
		this.view.text.getComponent(cc.Label).string = '正在加载中...'
	},

	start () {

	},

	update (dt) {
		if(this.view['loading/bar'].getComponent(cc.ProgressBar).progress <= 1){
			this.view['loading/bar'].getComponent(cc.ProgressBar).progress += 0.01
		}
		if(this.view['loading/bar'].getComponent(cc.ProgressBar).progress > 1){
			cc.director.loadScene('loginScene')
		}
	},
});
